import request from '@/utils/request'

// 查询书籍列表
export function list(query) {
    return request({
        url: '/books/list',
        method: 'get',
        params: query
    })
}

// 查询书籍详细
export function getBook(visitorId) {
    return request({
        url: '/books/queryById' + visitorId,
        method: 'get'
    })
}

// 新增书籍
export function addBook(data) {
    return request({
        url: '/books/add',
        method: 'post',
        data: data
    })
}

// 修改书籍
export function updateBook(data) {
    return request({
        url: '/books/edit',
        method: 'post',
        data: data
    })
}

// 删除书籍
export function delBook(data) {
    return request({
        url: '/books/delete',
        method: 'post',
        data: data
    })
}
